const express = require('express')
const app = express()
const path = require('path')
// 静态资源托管图片 
app.use('/uploads', express.static(path.join(__dirname, './uploads')))
app.use(express.urlencoded({ extended: false }))
app.use(express.json())
app.use(require('cors')())
// require('./plugins/db.js')
require('./routes/admin')(app, express)
app.listen(3000, () => {
  console.log('http://127.0.0.1:3000')
})